package com.character.task;

import com.character.service.TesterService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @author:高杰领
 * @date:2021/12/9 14:25
 * @description:定时删除没有结果的测试用户
 * @version:1.0
 **/
@Component
@Slf4j
public class ScheduleTask {
    @Resource
    private TesterService testerService;
    @Scheduled(fixedRate = 1000*60*60)
    public void deleteNoResultTester(){
        testerService.deleteNoResultTester();
        log.debug("已经删除一个小时以上没有结果的测试用户");
    }
}
